#pragma once

class CExListViewCtrl 
    : public CWindowImpl<CExListViewCtrl, CListViewCtrl>
    , public COwnerDraw<CExListViewCtrl>
{
public:
    CExListViewCtrl();

    BEGIN_MSG_MAP(CExListViewCtrl)
        CHAIN_MSG_MAP_ALT(COwnerDraw<CExListViewCtrl>, 1)
    END_MSG_MAP()

    void DeleteItem(LPDELETEITEMSTRUCT lpDeleteItemStruct)
    { COwnerDraw<CExListViewCtrl>::DeleteItem(lpDeleteItemStruct); };

    BOOL DeleteItem(int nItem)
    { return CWindowImpl<CExListViewCtrl, CListViewCtrl>::DeleteItem(nItem); };

    void Attach(HWND hWndNew) throw();
    HWND Detach() throw();

    void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
    void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);

private:
    static const CRect ICON_INSETS;
    static const CRect TEXT_INSETS;
};
